package com.fowo.api.model.stock.in;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.fowo.api.common.validator.EnumsString;
import javax.validation.constraints.*;
import lombok.Getter;
import lombok.Setter;

/** 入库单 导入导出辅助模型 */
@Getter
@Setter
public class StockInExcelPo {

  @Size(max = 50, message = "入库单号长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "入库单号")
  private String orderSn;

  @NotNull(message = "入库仓库不能为空")
  @Size(max = 50, message = "入库仓库长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*入库仓库")
  private String warehouseName;

  @ExcelIgnore
  @ExcelProperty(value = "*入库仓库")
  private Long warehouse;

  @NotBlank(message = "入库类型不能为空")
  @Size(max = 50, message = "入库类型长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*入库类型")
  private String receiptType;

  @Size(max = 50, message = "供应商长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "供应商")
  private String supplierSupplierName;

  @ExcelIgnore
  @ExcelProperty(value = "供应商")
  private Long supplier;

  @Size(max = 50, message = "收货单号长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "收货单号")
  private String associatedPo;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "总入库量")
  private String totalStorage;

  @Size(max = 500, message = "备注长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "备注")
  private String remarks;

  @Size(max = 50, message = "采购单号长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "采购单号")
  private String purchaseOrderCode;

  @ExcelProperty(value = "运费")
  private java.math.BigDecimal freight;

  @ExcelProperty(value = "其他费用")
  private java.math.BigDecimal otherExpenses;

  @NotBlank(message = "费用分配方式不能为空")
  @EnumsString(
    value = { "不分配", "按金额", "按数量", "自定义" },
    message = "费用分配方式的可用值为 “不分配”, “按金额”, “按数量”, “自定义” 其中之一"
  )
  @Size(max = 50, message = "费用分配方式长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*费用分配方式")
  private String costAllocationType;

  @DateTimeFormat("yyyy年MM月dd日")
  @ExcelProperty(value = "入库日期")
  private java.util.Date warehousingDate;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "辅料总金额")
  private String accessoriesTotalAmount;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "金额")
  private String totalAmount;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "可用数量")
  private String totalNum;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "部门")
  private String applicationDepName;

  @ExcelIgnore
  @ExcelProperty(value = "部门")
  private Long applicationDep;

  @NotBlank(message = "产品类型不能为空")
  @EnumsString(
    value = { "原材料", "成品" },
    message = "产品类型的可用值为 “原材料”, “成品” 其中之一"
  )
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*产品类型")
  private String productType;

  @Size(max = 50, message = "采购员长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "采购员")
  private String cgRealname;

  @EnumsString(
    value = { "未生成", "已生成" },
    message = "生成应付的可用值为 “未生成”, “已生成” 其中之一"
  )
  @Size(max = 50, message = "生成应付长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "生成应付")
  private String generateAp;

  @EnumsString(
    value = { "未打回", "已打回" },
    message = "已驳回的可用值为 “未打回”, “已打回” 其中之一"
  )
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "已驳回")
  private String revocation;

  @Size(max = 50, message = "申请部门长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "申请部门")
  private String applicationDepName1;

  @Size(max = 50, message = "wid长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "wid")
  private String wid;

  @Size(max = 50, message = "采购员id长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "采购员id")
  private String cgUidName;

  @ExcelIgnore
  @ExcelProperty(value = "采购员id")
  private Long cgUid;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "采购组织")
  private String purchasingOrgName;

  @ExcelIgnore
  @ExcelProperty(value = "采购组织")
  private Long purchasingOrg;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "需求组织")
  private String needOrgName;

  @ExcelIgnore
  @ExcelProperty(value = "需求组织")
  private Long needOrg;

  @Size(max = 50, message = "添加类型长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "添加类型")
  private String addType;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "审批状态")
  private String aStatus;

  @EnumsString(
    value = { "待提交", "待入库", "已完成", "已撤销" },
    message = "单据状态的可用值为 “待提交”, “待入库”, “已完成”, “已撤销” 其中之一"
  )
  @Size(max = 50, message = "单据状态长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "单据状态")
  private String status;

  @Size(max = 50, message = "目标表ID列长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "目标表ID列")
  private String parentId;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "是否推送领星")
  private String isPush;

  @Size(max = 500, message = "驳回原因长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "驳回原因")
  private String rejectRemark;

  @EnumsString(
    value = { "低客单价", "高客单价" },
    message = "品类的可用值为 “低客单价”, “高客单价” 其中之一"
  )
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "品类")
  private String categoryId;
}
